// 细纱
export interface MainDataCardType {
  id: string
  machineName: string
  machineTypeId: number
  machineTypeName: string
  machineTypeDescription: string
  craftNodeName: string
  craftNodeId: string
  machineDisplayState: number
  stateCode: number
  yarnPercent: number
  materialName: string
  fromTable?: null
  runEfc: number
  speed: number
  currentShiftLength: number
  machinePersonnelOnDutys: string
  currentTime: number
  timeRemaining: number
  estimatedDoffingTime: string
  spinningTimeOfCurrentSpinningLength: string
  mroEmployeeName: string
  breakJointTimeAvg: number
  breaksPerKilo: number
  doffRate: number
  power: number
}

export interface BasicInfoType {
  materialName: string
  machineDocumentId: string
  craftNodeId: string
  craftNodeName?: null
  craftNodeOrder: number
  machineName: string
  machineNo: number
  totalLengthCal: number
  stateCode: number
  machineDisplayState: number
  positionComState?: null
  totalLength?: null
  currentShiftLength: number
  currentLength: number
  exchangeLength: number
  theoreticalYarnWeight?: null
  runTimes: number
  runEfc: number
  communicateErrorCnt: number
  lastModificationTime: string
  timeStamp: number
  end: string
  start: string
  breakCntPerKilo: number
  speedAvg1: number
  speedAvg2: number
  manufacturerName: string
}

export interface MainCardDetailInfoType {
  basic: BasicInfoType
  machineRealInfo: any
}

export interface overallUnitType {
  machineDocumentId: string
  machineName: string
  machineNo: number
  comState?: null
  stateCode: number
  materialName: string
  currentLength: number
  doffingLength: number
  fixLength: number
  speed: number
  runEfc: number
  totalSpindles: number
  breakCnt: number
  badCnt: number
  nonCnt: number
  breakJointTimeAvg: number
  lowTwistCnt: number
  doffIntactRate: number
  breakCntPerKilo: number
  breakCntFromLast: number
  currentCsLength: number
}

export interface singleIngotType {
  machineName: string
  positionId: number
  side: string
  state: number
  length: number
  speed: number
  startTime: string
}

export interface brokenEndType {
  machineDocumentId: string
  machineName: string
  machineNo: number
  side: string
  positionId: number
  breakCount: number
  breakDuration: number | string
  nonDuration: number | string
  twistDuration: number | string
  twistCount: number
  personName: string
}

export interface CategoryStatisticsRowVO {
  variety: string
  openedNumber: number
  accumulatedLength: number
  ingotSpeed: number
  currentLength: number
}

export interface MaterialRowVO {
  materialId: string
  materialName: string
  efcRun: number
  productionRun: number
  dofferCnt: number
  yarnLength: number
  actualYarnWeight: number
  breakLength: number
  breakWeight: number
  jointTimeAvg: number
  breakCntPerKilo: number
  breakCnt: number
  breakCntRepeat: number
  jointCnt: number
  spindleSpeedAvg: number
  twistCnt: number
  twistTimeTotal: number
}

export interface ShiftMaterialRowVO {
  tsid: number
  shiftName: string
  materialId: string
  materialName: string
  machineCntByMaterial: number
  efcRun: number
  productionRun: number
  dofferCnt: number
  yarnLength: number
  actualYarnWeight: number
  breakLength: number
  breakWeight: number
  jointTimeAvg: number
  breakCntPerKilo: number
  breakCntFromLast: number
  breakCntToNext: number
  breakCnt: number
  breakCntRepeat: number
  spindleSpeedAvg: number
  twistCnt: number
  twistTimeTotal: number
}
export interface MachineMaterialRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  tsid: number
  shiftName: string
  materialId: string
  materialName: string
  personDocumentId?: null
  personDocumentName: string
  efcRun: number
  productionRun: number
  dofferCnt: number
  yarnLength: number
  actualYarnWeight: number
  breakLength: number
  breakWeight: number
  jointTimeAvg: number
  breakCntPerKilo: number
  breakCntFromLast: number
  breakCntToNext: number
  breakCnt: number
  breakCntRepeat: number
  materialChangeFlag: boolean
  jointCnt: number
  spindleSpeedAvg: number
  repeakBreakCnt: number
  repeakBreakSpindles: string
  twistCnt: number
  twistTimeTotal: number
  yarnBreakDetection: number
}

export interface IngotReportRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  side: string
  positionId: number
  yarnBreakCnt: number
  yarnBreakDurationTotal: number | string
  yarnLowCnt: number
  yarnLowDurationTotal: number | string
  exceptionDurationTotal: number | string
}

export interface DoffReportRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  materialName: string
  tsid: number
  shiftName: string
  teamSet: string
  startTime: string
  endTime: string
  fixedLength: number
  yarnLength: number
  duration: number
  doffIntactRate: number
  personName?: null
}

export interface DoffPredictionRowVO {
  processName: string
  machineName: string
  machineNo: number
  machineDisplayState: number
  currentLength: number
  fixLength: number
  speed2: number
  remainLength: number
  estimatedDoffingTime: string
  employeeName: string
}
export interface DoffStatisticsRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  tsId: number
  shiftName: string
  teamSet: string
  doffingCnt: number
  doffingTimesTotal: number
  doffingTimesAvg: number
  doffingLengthTotal: number
  doffingLengthAvg: number
}

export interface DoffRecordRowVO {
  rowGuid: string
  tsId: number
  shiftName: string
  teamSet: string
  machineDocumentId: string
  machineName: string
  machineNo: number
  personName: string
  doffingStart: string
  doffingTimes: number
  doffingLength: number
  fixedLength: number
  difference: number
  doffIntactRate: number
}

interface RovingList {
  materialId: string
  machineDocumentId: string
  backRollerSpeed: number
  currentLengthCs: number
  frontRollerSpeed: number
  spindleSpeed: number
  csSpeed: number
  doffTime?: null
  fixedLength: number
  rovingDuration: number
  draftTimes: number
  texNumber: number
  start: string
}

export interface AllPredictionRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  stateCode: number
  stateStart: string
  machineDisplayState: number
  uptime: string
  materialId: string
  materialName: string
  changeTime: string
  fixRationCs: number
  fixLengthCs: number
  currentLengthCs: number
  spindleSpeed: number
  backRollerSpeed: number
  predictionChangeTimeNext: string
  draftTimes: number
  fixLengthXs: number
  currentLenghXs: number
  spindleSetNum: number
  frontRollerSpeed: number
  duration?: null
  currentFlag: boolean
  rovingList: RovingList
  weightPerMetre: number
  spindleNums: number
}

export interface DoffBrokenRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  barrelNo: string
  materialName: string
  personName: string
  spinningStart: string
  spinningEnd: string
  speedAvg: number
  fixedLength: number
  doffingLength: number
  startBreakCnt: number
  startSpeed: number
  smallBreakCnt: number
  smallBreakRepeatCnt: number
  smallSpeed: number
  middleBreakCnt: number
  middleBreakRepeatCnt: number
  middleSpeed: number
  largeBreakCnt: number
  largeBreakRepeatCnt: number
  largeSpeed: number
  breakCnt10Left: number
  breakCnt10Right: number
  breakCnt20Left: number
  breakCnt20Right: number
  breakCnt30Left: number
  breakCnt30Right: number
  breakCnt40Left: number
  breakCnt40Right: number
  breakCnt50Left: number
  breakCnt50Right: number
  breakCnt60Left: number
  breakCnt60Right: number
  breakCnt70Left: number
  breakCnt70Right: number
  breakCnt80Left: number
  breakCnt80Right: number
  breakCnt90Left: number
  breakCnt90Right: number
  breakCnt100Left: number
  breakCnt100Right: number
  breakCnt: number
  breakRepeatCnt: number
  breakRepeat: string
  breakTimes: number
  doffIntactRate: number
  doffBreakCnt: number
  stopCnt: number
  stopTime: number
  twistCnt: number
  breakPerKilo: number
}

// 粗纱
export interface MachineListRowVO {
  id: string
  tenantId: string
  craftNodeId: string
  collectDriveId: string
  collectDriveName: string
  collectVersionId: string
  collectAgreementId?: null
  collectAgreementName?: null
  powerCollectAgreementName: string
  spindleXSCollectAgreementName?: null
  craftNodeName: string
  materialCraftNodeName: string
  craftNodeOrder: number
  machineTypeId: number
  machineTypeName: string
  machineTypeDescription: string
  machineNo: number
  machineName: string
  ip: string
  slubIp?: null
  modbusAddr: number
  colletcVersion: string
  yarnBreakDetection: number
  spindleNums: number
  periodModel?: null
  segmentedNums: number
  manufacturerId: string
  manufacturerName: string
  textileMillName: string
  textileGroupName: string
  textileMillCode: string
  databaseAccount?: null
  databasePassword?: null
  databasePath?: null
  port: number
  source: number
  powerSign: boolean
  powerSource: number
  powerMachineTypeId?: null
  powerCollectVersionId: string
  powerCollectAgreementId: string
  spindleXSCollectAgreementId?: null
  spindleIp?: null
  powerIp: string
  powerAddr: number
  powerIndividualLoad: boolean
  powerLoadNumber: number
  cbf?: null
  energyStructureId?: null
  machineGatherCycle: number
  machineInstructionCycle: number
  energyGatherCycle: number
  energyInstructionCycle: number
  collectVersionSlubId?: null
  collectAgreementSlubId?: null
  slubSign?: null
}

export interface BrokenListRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  breakCount: number
  positionId: number
  duration: number
}

export interface RecordListRowVO {
  machineDocumentId: string
  machineName: string
  machineNo: number
  personName: string
  positionId: number
  tsid: number
  startTime: string
  duration: number
  count?: null
}

export interface StatisticsReportRowVO {
  materialName: string
  materialId: string
  yarnLength: number
  doffingCount: number
  totalSpindles: number
  doffingLengthAvg: number
  weightPerLength: number
  weightPerLengthUnit: number
  actualYarnWeight: number
  details: DetailsReportRowVO[]
}

export interface DetailsReportRowVO {
  materialName: string
  materialId: string
  machineName: string
  machineDocumentId: string
  yarnLength: number
  doffingCount: number
  totalSpindles: number
  doffingLengthAvg: number
  actualYarnWeight: number
  weightPerLength: number
  weightPerLengthUnit: number
}
export interface CreelingRowVO {
  remainCnt: number
  rovingRenewCs: RovingRenewCs[]
}

export interface RovingRenewCs {
  id: string
  machineDocumentId: string
  machineName: string
  machineNo: number
  materialId: string
  materialName: string
  stateCode: number
  csFixLength: number
  theoreticalCsFixLength: number
  csCurrentLength: number
  predictionChangeTimeNext: string
  remark?: null
  rowDetail: RowDetail[]
  processResetInfoCs: any
  rollarLinearSpeed?: null
}
interface RowDetail {
  rowNumber: number
  remainCnt: number
  predictionChangeTimeNext?: null
}
